package org.collab_games.engine.wrappers;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;

public class Line {
Vector3 point1, point2;
public Line(Vector3 point1, Vector3 point2) {
	this.point1 = point1;
	this.point2 = point2;
}

public void draw(Graphics g, double zoom, Dimension viewport) {
	Vector2 pointA = point1.flatten(zoom, viewport), pointB = point2.flatten(zoom, viewport);
	g.drawLine(pointA.x, pointA.y, pointB.x, pointB.y);
}

public void draw(Graphics g, double zoom, Dimension viewport, Color color) {
	Color c1 = g.getColor();
	g.setColor(color);
	Vector2 pointA = point1.flatten(zoom, viewport), pointB = point2.flatten(zoom, viewport);
	g.drawLine(pointA.x, pointA.y, pointB.x, pointB.y);
	g.setColor(c1);
}
}
